package com.slz3.business.module.configManagement.conSiteCity.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conSiteCity.domain.ConSiteCity;
import com.slz3.business.module.configManagement.conSiteCity.domain.ConSiteCityCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteCityResAtomic {

    static Mono<ServerResponse> add_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCity conSiteCity) {
        return ConSiteCityResSafeValid.add(req, conSiteCity) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.add(req, conSiteCity);
    }

    public static Mono<ServerResponse> delete_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        return ConSiteCityResSafeValid.delete(req, conSiteCityCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCity conSiteCity) {
        return ConSiteCityResSafeValid.modify(req, conSiteCity) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.modify(req, conSiteCity);
    }

    static Mono<ServerResponse> info_$ConSiteCityUpdateLock(ServerRequest req) {
        return ConSiteCityResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        return ConSiteCityResSafeValid.auditSubmit(req, conSiteCityCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        return ConSiteCityResSafeValid.audit(req, conSiteCityCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        return ConSiteCityResSafeValid.auditReject(req, conSiteCityCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        return ConSiteCityResSafeValid.usingEnable(req, conSiteCityCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConSiteCityUpdateLock(ServerRequest req, ConSiteCityCondition conSiteCityCondition) {
        return ConSiteCityResSafeValid.usingDisable(req, conSiteCityCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConSiteCityResExecutor.usingDisable(req);
    }
}
